package com.huineta.business.modules.not.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huineta.business.modules.not.domain.SysInbox;
import com.huineta.business.modules.not.param.SysInboxRequest;
import com.huineta.business.modules.not.service.ISysInboxService;
import com.huineta.business.common.web.base.page.PageResponse;
import com.huineta.business.common.web.base.page.Pageable;
import com.huineta.business.modules.not.mapper.SysInboxMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SysInboxServiceImpl extends ServiceImpl<SysInboxMapper, SysInbox> implements ISysInboxService {

    @Resource
    private SysInboxMapper sysInboxMapper;

    @Override
    public List<SysInbox> list(SysInboxRequest request) {
        return sysInboxMapper.selectInbox(request);
    }

    @Override
    public PageResponse<SysInbox> page(SysInboxRequest request) {
        return Pageable.of(request, (()-> sysInboxMapper.selectInbox(request)));
    }
}
